package com.myspring.lab.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Objects;

@Entity
public class Project {
    private String proNo;
    private String proName;
    private String proUser;
    private String proGrade;
    private Integer proFee;
    private String proDetail;

    @Id
    @Column(name = "pro_no", nullable = false, length = 100)
    public String getProNo() {
        return proNo;
    }

    public void setProNo(String proNo) {
        this.proNo = proNo;
    }

    @Basic
    @Column(name = "pro_name", nullable = true, length = 100)
    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    @Basic
    @Column(name = "pro_user", nullable = true, length = 100)
    public String getProUser() {
        return proUser;
    }

    public void setProUser(String proUser) {
        this.proUser = proUser;
    }

    @Basic
    @Column(name = "pro_grade", nullable = true, length = 100)
    public String getProGrade() {
        return proGrade;
    }

    public void setProGrade(String proGrade) {
        this.proGrade = proGrade;
    }

    @Basic
    @Column(name = "pro_fee", nullable = true)
    public Integer getProFee() {
        return proFee;
    }

    public void setProFee(Integer proFee) {
        this.proFee = proFee;
    }

    @Basic
    @Column(name = "pro_detail", nullable = true, length = 200)
    public String getProDetail() {
        return proDetail;
    }

    public void setProDetail(String proDetail) {
        this.proDetail = proDetail;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Project project = (Project) o;
        return Objects.equals(proNo, project.proNo) && Objects.equals(proName, project.proName) && Objects.equals(proUser, project.proUser) && Objects.equals(proGrade, project.proGrade) && Objects.equals(proFee, project.proFee) && Objects.equals(proDetail, project.proDetail);
    }

    @Override
    public int hashCode() {
        return Objects.hash(proNo, proName, proUser, proGrade, proFee, proDetail);
    }
}
